<template>
    <view>
        <status-bar :title="title"></status-bar>
        <view class="Wrapper">
            <view class="list">
                <text class="title">{{ pageData.title }}</text>
                <text class="add_time">{{ pageData.add_time }}</text>
            </view>
        </view>

        <view class="Content">
            <u-parse :content="pageData.content" :domain="imgUrl"></u-parse>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                imgUrl: this.imgUrl,
                title: '',
                id: '',
                pageData: ''
            };
        },
        onLoad(opt) {
            if (opt.id) this.id = opt.id;
            this.DossierInfo();
        },
        methods: {
            DossierInfo() {
                this.$http
                    .post({
                        url: '/singleSaleApi/getUserDossierInfo',
                        data: {
                            id: this.id
                        }
                    })
                    .then((res) => {
                        if (res.errcode != '100') return this.$Toast(res.msg);
                        this.title = res.title;
                        const result = res.data;
                        this.pageData = result;
                    });
            }
        }
    };
</script>

<style lang="scss">
    .Wrapper {
        width: 100%;
        background-color: $page;
        padding: 10rpx 0;
        .list {
            width: 710rpx;
            margin: 24rpx auto;
            padding: 20rpx 24rpx;
            background-color: #fff;
            display: flex;
            flex-direction: column;
            border-radius: 10rpx;

            .title {
                color: #333;
                font-size: 30rpx;
            }
            .add_time {
                color: #999;
                font-size: 24rpx;
                margin-top: 10rpx;
            }
        }
    }
    .Content {
        width: 100%;
        padding: 24rpx;
    }
</style>
